package com.biz.primus.ms.product.feign;

import com.biz.primus.model.depot.vo.*;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author defei
 * @date 2017/9/13
 */
@FeignClient(qualifier = "depotFeignClient", name = "service-depot")
public interface DepotFeignClient {

    @GetMapping("getWarehouseDepotByProvinceId")
    DepotRespVo getWarehouseDepotByProvinceId(@RequestParam("provinceId") Integer provinceId);

    @GetMapping("findDBDepotsByWarehouseCode")
    List<DepotRespVo> findDBDepotsByWarehouseCode(@RequestParam("warehouseCode") String warehouseCode);

    @GetMapping("listAllAreaNo")
    List<String> listAllAreaNo();

    @GetMapping("getAreaNos")
    List<String> getAreaNos();

    @PostMapping("depotPromotions")
    List<DepotPromotionRespVo> depotPromotions(@RequestBody List<DepotPromotionReqVo> depotPromotionReqVos);

    @PostMapping("depotPromotion")
    DepotPromotionRespVo depotPromotion(@RequestBody DepotPromotionReqVo depotPromotionReqVo);

    @PostMapping("findDepotsByDepotCodes")
    List<DepotRespVo> findDepotsByDepotCodes(@RequestBody List<String> strings);

    @GetMapping("findDepotCodeOrWarehouseDepotCodeByDepotId")
    DepotCodeQueryVo findDepotCodeOrWarehouseDepotCodeByDepotId(@RequestParam("depotId") Long depotId);

    @PostMapping("findNearDepot")
    List<DepotRespVo> findNearDepot(@RequestBody SearchDepotConditionVo searchDepotConditionVo);

    @GetMapping("findDepotByDepotCode")
    DepotRespVo findDepotByDepotCode(@RequestParam("warehouseDepotCode") String warehouseDepotCode);
}
